package ioc14;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.text.ParseException;
import java.util.Date;

public class Test2 {
    public static void main(String[] args) throws ParseException {
        ApplicationContext ac = new ClassPathXmlApplicationContext("ioc14/spring2.xml");
        Date date = (Date) ac.getBean("date");
        System.out.println(date);

       /* Date date2 = new SimpleDateFormat("yyyy-MM-dd").parse("2020-12-31");
        System.out.println(date2);*/
    }
}
